package com.jron.cqiu.kernel.util;

/**
 * Created by Intellij IDEA.
 *
 * @Author: Yejw
 * @Date: 2008-5-28
 * @Time: 11:10:53
 */
public interface SingletonStrategy {

    /**
     * 默认单例策略实现类
     */
    public static final String defaultSingletonClass = System.getProperty(
            "com.jron.cqiu.SingletonFactory.singleton.strategy", "com.jron.cqiu.kernel.util.SingletonFactory");

    /**
     * return a singleton instance of the class specified in
     */
    Object instance();

    /**
     * reset the instance to a new instance for the implemented strategy
     */
    void reset();

    /**
     * set a singleton class name that will be used to create the singleton
     * based on the strategy implementation of this interface. The default
     * constructor of the class will be used and must be public.
     */
    void setSingletonClassName(String singletonClassName);

}
